package com.jby.autotest.service.tender;

import com.jby.autotest.model.Tender;

import java.util.List;

public interface PublishFirstTenderService {

    /**
     * 发布借款
     * @param tender        借款人id
     */
    List<Integer> publishFirstTender(Tender tender) throws Exception;

    /**
     * 插入盟商审核意见
     * @param tenderId 标id
     * @return 是否插入成功
     */
    public boolean insertDTenderReviewIdeaRecordWithMengShang(int tenderId) throws Exception;

    /**
     * 设置借款分类，并上传图片
     * @param tenderId              标id
     * @param userId                用户id
     * @param purposeOfBorrowing    借款目的
     */
    public boolean insertLoanClassify2(int tenderId, int userId, String purposeOfBorrowing) throws Exception;

    /**
     * 保存车房贷资产明细信息等
     * @param tenderId      标id
     * @param tenderType    标类型
     * @return 是否保存成功
     */
    public boolean saveAssetDetails(int tenderId, int tenderType) throws Exception;

    /**
     * 完善借款人个人信息（从事行业）
     * @param tenderId  标id
     * @return 是否完善成功
     */
    public boolean updateBorrowBasicInfoAndIndustry(int tenderId) throws Exception;

    /**
     * 保存借款人受益人
     * @param tenderId
     * @param borrowerUid
     * @return
     */
    public boolean saveBeneficiarysWithBorrower(int tenderId, int borrowerUid) throws Exception;

    /**
     * 保存共借人，及共借人保险受益人
     * @param tenderId
     * @param borrowerUid
     * @return
     */
    public boolean saveBeneficiarysWithCommonBorrower(int tenderId, int borrowerUid) throws Exception;

    /**
     * 更新待总部初审状态
     * @param tenderId  标id
     * @param status    标状态（这里填11）
     * @return 是否更新成功
     */
    public boolean updateTenderStatus(int tenderId,int status) throws Exception;

    /**
     * 插入资管审核意见
     * @param tenderId
     * @return
     */
    public boolean insertDTenderReviewIdeaRecordWithZiGuan(int tenderId) throws Exception;

    /**
     * 插入总部审核意见
     * @param tenderId      标的id
     * @param operatorType  后台审核标意见记录类型
     * @return 是否插入成功
     */
    public boolean insertDTenderReviewIdeaRecordWithZongBu(int tenderId, int operatorType) throws Exception;

    /**
     * 推送标到新理财债权池
     * @param tenderId 标id
     * @return 结果集
     */
    public boolean sendToTenderPool(int tenderId) throws Exception;

    /**
     * 用户确认借贷
     * @param tenderIdList 标id
     * @param loanSource  确认借贷来源:1PC前台 2APP
     * @return 确认借贷是否成功
     * 备注：只要含有征信费，不论来源是PC还是app都会上报征信
     */
    public boolean userEnsureOwnTender(List<Integer> tenderIdList, String loanSource) throws Exception;

    /**
     * PC端_总部终审
     * @param tenderIdList 标id
     * @return 是否成功
     */
    public boolean tenderFinalCheck(List<Integer> tenderIdList) throws Exception;
}
